#define _CRT_SECURE_NO_WARNINGS
#include "Stack.h"

void TestStack()
{
	Stack sl;
	StackInit(&sl);
	StackPush(&sl, 1);
	StackPush(&sl, 2);
	StackPush(&sl, 3);
	StackPush(&sl, 4);
	StackPrint(&sl);

	StackPop(&sl);
	StackPrint(&sl);
	while (!StackEmpty(&sl))
	{
		StackType ret = StackTop(&sl);
		printf("%d ", ret);
		StackPop(&sl);
	}
	printf("\n");

	int size = StackSize(&sl);
	printf("size = %d\n", size);
}

int main()
{
	TestStack();

	return 0;
}